package org.skydiveapplibrary.data;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import org.skydiveapplibrary.R;

public enum TimeUnit
{
	Days (R.string.time_unit_days, Calendar.DATE),
	Months (R.string.time_unit_months, Calendar.MONTH),
	Years (R.string.time_unit_years, Calendar.YEAR);
	
	private int resourceId;
	private int calendarField;
	
	TimeUnit(int resourceId, int calendarField)
	{
		this.resourceId = resourceId;
		this.calendarField = calendarField;
	}
	
	public int getResourceId()
	{
		return resourceId; 
	}
	
	public int getCalendarField()
	{
		return calendarField;
	}
	
	public static List<TimeUnit> getItems()
	{
		List<TimeUnit> items = new ArrayList<TimeUnit>();
		for (TimeUnit item: TimeUnit.values())
		{
			items.add(item);
		}
		return items;
	}
}
